#!/usr/local/bin/perl
use LWP::Simple;
use FindBin qw($Script);
use strict;

my $url = "http://mlb.mlb.com/news/probable_pitchers.jsp?c_id=nyy";
my $html = get($url);
my $delimiter = '</table><br />';
while ($html =~ m{$delimiter})
{
  my $day = $`;
  $html = $';
  next if $day !~ /player_id=425426/;
  my $time = $1 if $day =~ m{<b>\s*(.*?(AM|PM).*?)\s*</b>};
  print "$time\n";
  my $date = $1 if $day =~ m{, ([A-Z][a-z]+\s+\d+)};
  print "$date\n";
  my $scout = $1 if $day =~ m{<b>Yankees:</b>\s*([^<]+)\s*<};
  #next;
  #$day =~ s{<[^>]+>}{}g;
  #$day =~ s{\s+}{ }g;
  print "$scout\n";
}
